<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    #parent{
      height: 300px;
      width: 300px;
    }
    #s1,#s2,#s3{
      height: 100px;
      width: 100px;
    }
    #s1{
      background-color: green;
        float: left;

    }
    #s2{
      background-color: blue;
      float:left;
    }
    #s3{
      background-color: yellow;
      float: left;
    }
  /*  浮动*/



  </style>
</head>
<body>
<div id="parent">
  <div id="s1">1</div>
  <div id="s2">2</div>
  <div id="s3">3</div>
</div>

</body>
</html>